<template>
  <van-tabbar v-model="active" active-color="#F62C2C" route>
  <van-tabbar-item icon="https://img.4g368.com/attach/2021/10/439f9202110261717201796.png" to="/home">首页</van-tabbar-item>
  <van-tabbar-item icon="https://img.4g368.com/attach/2021/10/7281c202110261717194528.png" to="/about">分类</van-tabbar-item>
  <van-tabbar-item icon="https://img.4g368.com/attach/2021/10/f3f19202110261717207584.png" to="/cart" :badge="shoplist.length">购物车</van-tabbar-item>
  <van-tabbar-item icon="https://img.4g368.com/attach/2021/10/22daa202110261717214376.png" to="/user">我的</van-tabbar-item>
</van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },
  computed: {
    shoplist() {
      return this.$store.state.cart.shoplist;
    },
  },
};
</script>

<style lang="less" scoped>

</style>